import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () =>import ('views/home/Home')
const Myself = () =>import ('views/Myself')
const Message = () =>import ('views/Message')
const Community = () =>import ('views/Community')
Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: '/message',
    component: Message,
    meta:{
      showTab:true
    }
  },
  {
    path: '/profile',
    component: Myself,
    meta:{
      showTab:true
    }
  }, {
    path: '/community',
    component: Community,
    meta: {
      showTab: true
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router